﻿#region The MIT License (MIT)
// The MIT License (MIT)
// Copyright (c) 2010 - 2013 Sovacode LLC
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated 
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all copies or substantial portions
// of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#endregion

using System.Collections.Generic;
using Sovacode.RubiksCube.Common.Managers.Command;
using Sovacode.RubiksCube.Common.Managers.Settings;
using Sovacode.RubiksCube.Common.Managers.Validation;
using Sovacode.RubiksCube.Common.Service;
using Sovacode.RubiksCube.Common.Service.Progress;

namespace Sovacode.RubiksCube.Common.ViewModel
{
    /// <summary>
    /// Base Interface for View Models
    /// </summary>
    public interface IViewModelTop : ICommandRegistrar, IValidationRegistrar, IShowWindow
    {
        /// <summary>
        /// Window Service <see cref="IWindowService"/>
        /// </summary>
        IWindowService WindowService { get; set; }
        /// <summary>
        /// Settings Manager <see cref="ISettingsManager"/>
        /// </summary>
        ISettingsManager SettingsManager { get; set; }
        /// <summary>
        /// Command Manager <see cref="ICommandManager"/>
        /// </summary>
        ICommandManager CommandManager { get; }
        /// <summary>
        /// Validation Manager <see cref="IValidationManager"/>
        /// </summary>
        IValidationManager ValidationManager { get; }

        /// <summary>
        /// Gets the progress service.
        /// </summary>
        /// <value>The progress service.</value>
        IProgressService ProgressService { get; }

        /// <summary>
        /// Gets a value indicating whether the view model is valid
        /// </summary>
        bool IsValid { get; }

        /// <summary>
        /// Load Settings
        /// </summary>
        void LoadSettings();

        #region Total

        /// <summary>
        /// Invalid Commands
        /// </summary>
        IReadOnlyCollection<string> InvalidCommands { get; }
        /// <summary>
        /// All Commands
        /// </summary>
        IReadOnlyCollection<string> AllCommands { get; }
        /// <summary>
        /// Valid Commands
        /// </summary>
        IReadOnlyCollection<string> ValidCommands { get; }

        /// <summary>
        /// Invalid Settings
        /// </summary>
        IReadOnlyCollection<string> InvalidSettings { get; }
        /// <summary>
        /// All Settings
        /// </summary>
        IReadOnlyCollection<string> AllSettings { get; }
        /// <summary>
        /// Valid Settings
        /// </summary>
        IReadOnlyCollection<string> ValidSettings { get; }

        /// <summary>
        /// Invalid Validators
        /// </summary>
        IReadOnlyCollection<string> InvalidValidators { get; }
        /// <summary>
        /// All Validators
        /// </summary>
        IReadOnlyCollection<string> AllValidators { get; }
        /// <summary>
        /// Valid Validators
        /// </summary>
        IReadOnlyCollection<string> ValidValidators { get; }

        /// <summary>
        /// Invalid Bad Commands Count
        /// </summary>
        int InvalidCommandsCount { get; }
        /// <summary>
        /// Commands Count
        /// </summary>
        int CommandsCount { get; }
        /// <summary>
        /// Valid Commands Count
        /// </summary>
        int ValidCommandsCount { get; }

        /// <summary>
        /// Invalid Settings Count
        /// </summary>
        int InvalidSettingsCount { get; }
        /// <summary>
        /// Settings Count
        /// </summary>
        int SettingsCount { get; }
        /// <summary>
        /// Valid Settings Count
        /// </summary>
        int ValidSettingsCount { get; }

        /// <summary>
        /// Invalid Validators Count
        /// It's not a invalid in case of validation, it's invalid in case of fail registration
        /// </summary>
        int InvalidValidatorsCount { get; }
        /// <summary>
        /// Validators Count
        /// </summary>
        int ValidatorsCount { get; }
        /// <summary>
        /// Valid Validators Count
        /// It's not a invalid in case of validation, it's invalid in case of fail registration
        /// </summary>
        int ValidValidatorsCount { get; }

        #endregion
    }
}